<!DOCTYPE html>
<html>
	{include file="head.html"}

	<body>
		<div class="tophd">
			UI组件管理
			<a class="add" href="/admin.php?m=diy_uicompent&a=add">添加</a>
			<div class="refresh js-refresh">刷新</div>
		</div>
		<div class="main-body">
			<table class="tbs">
				<thead>
					<tr>
						<td>名称</td>
						<td>标签</td>
						<td>操作</td>
					</tr>
				</thead>
				{foreach item=c from=$data}
				<tr>
					<td>{$c.title}</td>
					<td>{$c.tag}</td>
					<td>
						<a href="javascript:;" class="js-view" data-id="{$c.id}">查看</a>
						<a href="/admin.php?m=diy_uicompent&a=edit&id={$c.id}">编辑</a>
						<a href="javascript:;" class="delete js-delete" url="/admin.php?m=diy_uicompent&a=delete&id={$c.id}">删除</a>
					</td>
				</tr>

				{/foreach}
			</table>
		</div>
	<script>
		$(document).on("click",".js-view",function(){
			var id=$(this).attr("data-id");
			var html='<iframe style="width:480px; height:320px; border:0;" src="/admin.php?m=diy_uicompent&a=view&id='+id+'"></iframe>';
			showbox("组件预览",html,520,320);
		})
	</script>	
	</body>

</html>